using System;

namespace Aragorn.SOA.ORM.Lambda.Adapter
{
	internal class SqlServer2012Adapter : SqlServerAdapterBase, ISqlAdapter
	{
		public SqlServer2012Adapter()
		{
		}

		public string QueryStringPage(string source, string selection, string conditions, string order, int pageSize, int pageNumber)
		{
			object[] objArray = new object[] { selection, source, conditions, order, pageSize * (pageNumber - 1), pageSize };
			return string.Format("SELECT {0} FROM {1} {2} {3} OFFSET {4} ROWS FETCH NEXT {5} ROWS ONLY", objArray);
		}
	}
}